<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <p class="box1">飞流直下<strong>三千尺</strong></p>
    <p class="box2">疑是银河落九天</p>
    <div class="box3">蒹葭苍苍 白露为霜 <br> 
        所谓伊人 在水一方</div>
    
</body>
<script>
    const em1 = document.querySelector('.box1');
    console.log(em1.innerHTML);  //获取
    em1.innerHTML = '大数据，<em>大智慧<em/>，大未来';  //设置
    console.log(em1.innerHTML);
    em1.innerText = '飞流直下<strong>三千尺</strong>';
    console.log(em1.textContent);
    em1.textContent = '大数据，<em>大智慧<em/>，大未来';
    const em2 = document.querySelector('.box3');
    console.log(em2.innerHTML);
    console.log(em2.innerText);
    console.log(em2.textContent);
</script>
</html>